package com.jason.www.service.impl;

import com.jason.www.dao.UserMapper;
import com.jason.www.domain.User;
import com.jason.www.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Cai on 2018/6/7.
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public void findUser() {
        System.out.println("findUser 方法执行");
    }

    @Override
    public Boolean addUser(User user) {
        Boolean result = userMapper.insertUser(user);
        int i = 1/0;
        return result;
    }

}
